import React from "react";
import GoodsList from './pages/GoodsList'
import Home from './pages/Home'
import My from './pages/My'
import NewsList from './pages/NewsList'
import NotFound from './pages/NotFound'
import './App.css'
import Redirect from './components/Redirect'

import MyNav from "./components/MyNav";

import {
    Route,
    Routes,
    Navigate,
} from 'react-router-dom'



function App(props) {
    return (
        <div id={"container"}>
            <MyNav></MyNav>
            <Routes>
                <Route path={'*'} element={<NotFound></NotFound>}></Route>
                <Route path={'/'} element={<Home></Home>}></Route>
                <Route path={'/goodList'} element={<GoodsList></GoodsList>}></Route>
                <Route path={'/newsList'} element={<NewsList></NewsList>}></Route>
                <Route path={'/my'} element={<My></My>}></Route>
                <Route path={'/home'} element={<Redirect to={'/'}></Redirect>}></Route>
            </Routes>
        </div>
    )
}

export default App 